using Microsoft.AspNetCore.Mvc;
using Vin.AspNetCore.Core.Controller;
using Vin.Extension.NLog;
using Vin.Tool.Core.RandomCategory;

namespace Vin.WebApi.Tests.Controllers;

public class LoggerTestController : VinBaseController
{
    [HttpGet("/logger")]
    public IActionResult Get(string? data)
    {
        var num = RandomTool.RandomInt(0, 100);
        Logger.Info(num > 10 ? "测试/" + (num / 10) : "正式/", $"data: {data}");
        return Success(data + " " + num);
    }
}